<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="jquery.1.10.2.js"></script>
    <script src="index.js"></script>
    <style type="text/css">
        .wrapimg {
            width: 100%;
            height: 404px;
            position: relative;
        }

        .wrapimg ul {
            position: relative;
        }

        .wrapimg li {
            position: absolute;
            left: 0;
            top: 0;
            width: 100%;
            height: 404px;
            display: none;
        }

        .wrapimg .active {
            display: block;
        }

        .wrapimg li:nth-child(1) {
            background-color: #ccfdff;
        }

        .wrapimg li:nth-child(2) {
            background-color: #0b1a5f;
        }

        .wrapimg li:nth-child(3) {
            background-color: #f95b61;
        }
        .wrapimg li:nth-child(4) {
            background-color: #000;
        }
        .wrapimg li:nth-child(5) {
            background-color: #0d052c;
        }
        .img {
            position: absolute;
            left: 50%;
            margin-left: -575px;
        }

        @keyframes fadein {
            from {
                opacity: 0;
            }
            to {
                opacity: 1;
            }
        }

        @-webkit-keyframes fadein {
            from {
                opacity: 0;
            }
            to {
                opacity: 1;
            }
        }

        .active img {
            animation: fadein 2s;
        }

        #buttons {
            position: absolute;
            height: 20px;
            width: 170px;
            z-index: 2;
            bottom: 20px;
            left: 50%;
            margin-left: -70px;
        }

        #buttons span {
            cursor: pointer;
            float: left;
            border: 2px solid #fff;
            width: 20px;
            height: 20px;
            border-radius: 50%;
            background: #ccc;
            margin-right: 10px;
        }

        #buttons .on {
            background: orangered;
        }

        .arrow {
            cursor: pointer;
            /*display: none;*/
            line-height: 39px;
            text-align: center;
            font-size: 36px;
            font-weight: bold;
            width: 40px;
            height: 40px;
            position: absolute;
            z-index: 2;
            top: 180px;
            background-color: RGBA(0, 0, 0, .3);
            color: #fff;
            text-decoration:none;
        }

        .arrow:hover {
            background-color: RGBA(0, 0, 0, .7);
        }

        #container:hover .arrow {
            display: block;
        }

        #prev {
            left: 400px;
        }

        #next {
            right: 400px;
        }
    </style>
</head>
<body>
<div class="wrapimg">
    <ul>
        <li class="active">
            <img src="img/1.png" alt="" class="img">
        </li>
        <li>
            <img src="img/2.png" alt="" class="img">
        </li>
        <li>
            <img src="img/3.png" alt="" class="img">
        </li>
        <li>
            <img src="img/4.jpg" alt="" class="img">
        </li>
        <li>
            <img src="img/5.jpg" alt="" class="img">
        </li>
    </ul>
    <div id="buttons">
        <span index="1" class="on"></span>
        <span index="2"></span>
        <span index="3"></span>
        <span index="4"></span>
        <span index="5"></span>
    </div>
    <a href="javascript:void(0);" id="prev" class="arrow">&lt;</a>
    <a href="javascript:void(0);" id="next" class="arrow">&gt;</a>
</div>
</body>
</html>
